﻿@using Easy.CMS.Section.Models
@model SectionGroup

<div class="panel panel-default section-group" data-id="@Model.ID">
    <div class="panel-heading">
        <span class="badge">
            @Model.GroupName
        </span>
        <code class="badge">@Model.PartialView</code>
</div>
<ul class="list-group">
    @foreach (SectionContent content in Model.SectionContents.OrderBy(m => m.Order))
    {
        Html.RenderPartial("SectionPartial." + ((SectionContent.Types)content.SectionContentType) + ".Edit", content);
    }
</ul>
<div class="panel-footer">
    <a href="@Url.Action("Create", "SectionContentTitle", new { sectionGroupId=Model.ID,sectionWidgetId=Model.SectionWidgetId })" class="btn btn-link btn-xs dialog">
        <i class="glyphicon glyphicon-plus"></i>
        添加标题
    </a>
    <a href="@Url.Action("Create", "SectionContentParagraph", new { sectionGroupId=Model.ID,sectionWidgetId=Model.SectionWidgetId })" class="btn btn-link btn-xs dialog">
        <i class="glyphicon glyphicon-plus"></i>
        添加段落
    </a>
    <a href="@Url.Action("Create", "SectionContentCallToAction", new { sectionGroupId=Model.ID,sectionWidgetId=Model.SectionWidgetId })" class="btn btn-link btn-xs dialog">
        <i class="glyphicon glyphicon-plus"></i>
        添加链接
    </a>
    <a href="@Url.Action("Create", "SectionContentImage", new {sectionGroupId = Model.ID, sectionWidgetId = Model.SectionWidgetId})" class="btn btn-link btn-xs dialog">
        <i class="glyphicon glyphicon-plus"></i>
        添加图片
    </a>
    |
    <a href="@Url.Action("Edit", "SectionGroup", new {Id= Model.ID })" class="btn btn-link btn-xs dialog">
        <i class="glyphicon glyphicon-edit"></i>
        修改
    </a>
    <a href="@Url.Action("Delete", "SectionGroup", new {Id= Model.ID })" class="btn btn-link btn-xs ajax">
        <i class="glyphicon glyphicon-remove"></i>
        删除
    </a>
</div>
</div>